package main

import (
	"bytes"
	"fmt"
	"io"
	"os"
)

func main() {
	var w io.Writer
	w = os.Stdout
	if f, ok := w.(*os.File); ok {
		fmt.Println("io.Writer 是 os.File ", f)
	}
	if f, ok := w.(*bytes.Buffer); ok {
		fmt.Println("io.Writer 是 bytes.Buffer ", f)
	}
}
